<!DOCTYPE html>
<html>
<head>
    <title>查看--中软高科-2015</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../../Css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="../../Css/bootstrap-responsive.css"/>
    <link rel="stylesheet" type="text/css" href="../../Css/style.css"/>
    <script type="text/javascript" src="../../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../../Js/ckform.js"></script>
    <script type="text/javascript" src="../../Js/common.js"></script>
    <script type="text/javascript" src="../../Js/ckeditor/ckeditor.js"></script>


    <style type="text/css">
        body {
            padding-bottom: 40px;
        }

        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
    <script type="text/javascript">
        $(function () {
            $('#backid').click(function () {
                window.location.href = "index.html";
            });
        });
    </script>
</head>
<body>
<form action="index.html" method="post" class="definewidth m20">
    <table class="table table-bordered table-hover definewidth m10">
        <tr>
            <td width="10%" class="tableleft">姓名</td>
            <td id="dName">程俊</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">证件类型</td>
            <td>身份证</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">证件号</td>
            <td id="dIdcar">534534534</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">手机</td>
            <td id="dPhone">13124345432</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">座机</td>
            <td id="dTelphone">01068765432</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">性别</td>
            <td id="dSex">男</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">年龄</td>
            <td id="dAge">28</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">出生年月</td>
            <td id="dBirthday">1981-09-04</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">电子邮箱</td>
            <td id="dEmail">chengjun@msn.com.cn</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">所属科室</td>
            <td id="dKeshi">急诊科</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">学历</td>
            <td id="dXueli">本科</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">备注</td>
            <td id="dDesc">工作热情积极表现非常的优异</td>
        </tr>
        <tr>
            <td colspan="2">
                <center>
                    <button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>
                </center>
            </td>
        </tr>
    </table>
</form>

<script>

    $(function () {
        loadDoctor();
    })

    String.prototype.GetValue = function (para) {
        let reg = new RegExp("(^|&)" + para + "=([^&]*)(&|$)");
        let r = this.substr(this.indexOf("\?") + 1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
    }

    // 获取医生信息
    function loadDoctor() {
        let url = document.location.toString();
        let dId = url.GetValue("dId");
        $.ajax({
            url: `/doctor/${dId}`,
            type: "GET",
            dataType: "json",
            success: function (res) {
                if (res.code == 200) {
                    let doctor = res.obj;
                    $("#dName").html(doctor.dName);
                    $("#dIdcar").html(doctor.dIdcar);
                    $("#dPhone").html(doctor.dPhone);
                    $("#dTelphone").html(doctor.dTelphone);
                    $("#dSex").html(doctor.dSex == '0' ? '男' : '女');
                    $("#dBirthday").html(doctor.dBirthday);
                    $("#dAge").html(doctor.dAge);
                    $("#dEmail").html(doctor.dEmail);
                    $("#dKeshi").html(doctor.dKeshi);
                    $("#dXueli").html(doctor.dXueli);
                    $("#dDesc").html(doctor.dDesc);
                }
            }
        })

    }
</script>

</body>
</html>